package mylab.usm.oauth2.server.utils;

import com.google.common.collect.Maps;
import lombok.Data;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

import java.util.Map;


/**
 * @author lapati5
 * @date 2021/8/4
 */
@Data
@Component
@ConfigurationProperties(prefix = OauthServiceProperties.PREFIX)
public class OauthServiceProperties {
    public final static String PREFIX = "ids";

    @Value("http://localhost:${server.port}")
    private String issuer;
    @Value("http://localhost:${server.port}")
    private String loginHost;
    @Value("http://localhost:${server.port}")
    private String confirmHost;
    private String jwksKeyId = "jwk-key-id";
    private String loginPageUrl;
    private String confirmPageUrl;
    private Map<String, String> extraScope = Maps.newHashMap();
    private boolean enableCustomizeLoginPage;
    private boolean enableCustomizeConfirmPage;
    private boolean enableRedisCache;
    private boolean enableDynamicIssuer;
    private boolean enableExternalLogin;
    private boolean enableExternalConfirm;
}
